package com.zhongwang.mms.module.purchase.dao;/**
 * 项目名称（软件名称）：忠旺机械物资管理系统(mms)
 * 研发设计单位：忠旺机械设备制造有限公司机械设计院智能控制设计科设计与研发。
 * 版权所有：忠旺机械设备制造有限公司
 * 注：本项目的一切技术专利，使用规范归解释权由忠旺机械设备制造有限公司所有。
 * 软件版本：Ver 1.0.0
 * 文件路径：com.zhongwang.mms.module.purchase.dao
 * 创建时间：2020年05月06日 18时06分
 **/

import com.zhongwang.mms.gen.entity.PInventory;
import com.zhongwang.mms.module.purchase.model.proInv.PProjectInventoryMarkModel;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @InterfaceName： PurProInvDao
 * @Description： 项目划库存持久层
 * @Author： 徐一贺
 * @Date： 2020/5/6 18:06
 * @Version： V1.0
 **/
@Repository
public interface PurProInvDao {
    /**
     *@FunctionName: findPProjectInventoryMarkList
     *@Description: 获取项目划库存申请列表
     *@Author: 徐一贺
     *@CreateDate: 2020/5/6 18:26
     *@Phone: 18241927380
     *@Param: [param] 检索条件
     *@Return: com.zhongwang.mms.common.JsonResult 项目划库存申请列表
     *@Version: 1.0.0
     */
    List<PProjectInventoryMarkModel> findPProjectInventoryMarkList(PProjectInventoryMarkModel param);

    /**
     *@FunctionName: insertPProjectInventoryMarkBySelective
     *@Description: 选择性插入项目化库存
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 10:38
     *@Phone: 18241927380
     *@Param: [param] 项目划库存信息
     *@Return: void 空
     *@Version: 1.0.0
     */
    void insertPProjectInventoryMarkBySelective(PProjectInventoryMarkModel param);

    /**
     *@FunctionName: updatePimAppStatusByPrimaryKeys
     *@Description: 根据主键们批量删除
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 13:18
     *@Phone: 18241927380
     *@Param: [param] 主键们和数据状态
     *@Return:
     *@Version: 1.0.0
     */
    int deleteByPrimaryKeys(PProjectInventoryMarkModel param);

    /**
     *@FunctionName: findPimAppStatusByPrimaryKeys
     *@Description: 根据主键们获取项目划库存申请列表
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 13:26
     *@Phone: 18241927380
     *@Param: [pimIds] 主键们
     *@Return: [List<PProjectInventoryMarkModel>] 项目划库存申请列表
     *@Version: 1.0.0
     */
    List<PProjectInventoryMarkModel> findPimAppStatusByPrimaryKeys(String pimIds);

    /**
     *@FunctionName: updatePimAppStatusByPrimaryKeys
     *@Description: 根据主键们更新申请状态
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 13:54
     *@Phone: 18241927380
     *@Param: [param.pimIds] 主键们，[param.pimAppStatus] 申请状态
     *@Return:
     *@Version: 1.0.0
     */
    void updatePimAppStatusByPrimaryKeys(PProjectInventoryMarkModel param);

    /**
     *@FunctionName: updatePimAppStatusByPrimaryKeys
     *@Description: 根据主键们更新申请状态
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 13:54
     *@Phone: 18241927380
     *@Param: [param.pimIds] 主键们，[param.pimAppStatus] 申请状态
     *@Return:
     *@Version: 1.0.0
     */
    void updatePimAppStatusByPrimaryKey(PProjectInventoryMarkModel param);

    /**
     *@FunctionName: getPProjectInventoryMarkModelByPrimaryKey
     *@Description: 根据主键获取项目划库存实体
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 14:21
     *@Phone: 18241927380
     *@Param: [pimId] 主键
     *@Return: [PProjectInventoryMarkModel] 项目划库存实体
     *@Version: 1.0.0
     */
    PProjectInventoryMarkModel getPProjectInventoryMarkModelByPrimaryKey(Integer pimId);

    /**
     *@FunctionName: insertPProjectInventoryMarkBySelective
     *@Description: 根据主键选择性更新项目化库存
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 10:38
     *@Phone: 18241927380
     *@Param: [param] 项目划库存信息
     *@Return: void 空
     *@Version: 1.0.0
     */
    void updateSelectiveByPrimaryKey(PProjectInventoryMarkModel updatePProjectInventoryMarkModel);
    /**
     *@FunctionName: updateSelectiveByPrimaryKeyNotHavePimAfterItyId
     *@Description: 根据主键选择性更新项目化库存不包含之后的库存ID
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 10:38
     *@Phone: 18241927380
     *@Param: [param] 项目划库存信息
     *@Return: void 空
     *@Version: 1.0.0
     */
    void updateSelectiveByPrimaryKeyNotHavePimAfterItyId(PProjectInventoryMarkModel updatePProjectInventoryMarkModel);
    /**
     *@FunctionName: reviewList
     *@Description: 审核列表
     *@Author: 徐一贺
     *@CreateDate: 2020/5/8 15:28
     *@Phone: 18241927380
     *@Param: [param] 检索条件
     *@Return: com.zhongwang.mms.common.JsonResult 项目划库存申请列表
     *@Version: 1.0.0
     */
    List<PProjectInventoryMarkModel> findReviewListList(PProjectInventoryMarkModel param);

    /**
     *@FunctionName: getInvProCountByPimBeforeItyId
     *@Description: 获取该物料的项目化库存执行后的数量
     *@DesignIdea: 请填写设计思想
     *@Author: 徐一贺
     *@CreateDate: 2020/6/22 13:32
     *@Phone: 18241927380
     *@Param:
     *@Return:
     *@Throw:
     *@Version: v 1.0.0
     */
    Integer getInvProCountByPimBeforeItyId(Integer pimBeforeItyId);
    /**
     *@FunctionName: createProInvTempTable
     *@Description: 创建临时表
     *@DesignIdea: 创建临时表
     *@Author: 徐一贺
     *@CreateDate: 2020/7/2 8:40
     *@Phone: 18241927380
     *@Param:
     *@Return:
     *@Throw:
     *@Version: v 1.0.0
     */
    void createProInvTempTable(PProjectInventoryMarkModel param);
    /**
     *@FunctionName: getProInvTempTableDataCount
     *@Description: 查询临时表数据行数
     *@DesignIdea: 查询临时表数据行数
     *@Author: 徐一贺
     *@CreateDate: 2020/7/2 8:40
     *@Phone: 18241927380
     *@Param:
     *@Return:
     *@Throw:
     *@Version: v 1.0.0
     */
    Integer getProInvTempTableDataCount(PProjectInventoryMarkModel param);
    /**
     *@FunctionName: selectProInvTempTableByParam
     *@Description: 查询临时表数据
     *@DesignIdea: 查询临时表数据
     *@Author: 徐一贺
     *@CreateDate: 2020/7/2 8:51
     *@Phone: 18241927380
     *@Param:
     *@Return:
     *@Throw:
     *@Version:  v 1.0.0
     */
    List<PProjectInventoryMarkModel> selectProInvTempTableByParam(PProjectInventoryMarkModel param);
    /**
     *@FunctionName: dropProInvTempTable
     *@Description: 删除临时表
     *@DesignIdea: 删除临时表
     *@Author: 徐一贺
     *@CreateDate: 2020/7/2 8:53
     *@Phone: 18241927380
     *@Param:
     *@Return:
     *@Throw:
     *@Version: v 1.0.0
     */
    void dropProInvTempTable(String tempTableName);

    /**
     * @title: getPProjectInventoryMarkModelByPrimaryKeys
     * @description: 根据主键们获取项目划库存申请
     * @param: [pimIds]
     * @return: java.util.List<com.zhongwang.mms.module.purchase.model.proInv.PProjectInventoryMarkModel>
     * @author: 徐一贺
     * @date: 2020/11/12 12:34
     * @versron: ver 1.0
     */
    List<PProjectInventoryMarkModel> getPProjectInventoryMarkModelByPrimaryKeys(String pimIds);

    /**  getPInventoryByPrimaryKey 根据主键获取库存
     * @param pimBeforeItyId 主键
     * @return com.zhongwang.mms.gen.entity.PInventory
     * @author 徐一贺
     * @date 2020/12/17 18:58
     */
    PInventory getPInventoryByPrimaryKey(Integer pimBeforeItyId);
}
